import {  Router, Route, Redirect } from 'react-router-dom'
import { history } from '@/utils'
import Login from './pages/Login'
import Layout from './pages/Layout'
import ProfileEdit from './pages/Profile/Edit'
import './App.scss'
const App = () => {
  return (
    <Router history={history}>
      <div className="app">
        {/* 已进入页面就到首页，精准定位    Redirect重定向 */}
        <Route exact path="/" render={() => <Redirect to="/home" />}></Route>
        {/* <Route path="/login" component={Login}></Route>
        <Route path="/home" component={Layout}></Route> */}
        <Route path='/login'><Login/></Route>
        <Route path='/home'><Layout/></Route>
        <Route path='/profile/edit'><ProfileEdit/></Route>
      </div>
    </Router>
  )
}
export default App
